/*!
 * \file BitMapDirectlyAddressedSets.h
 *
 * \date Nov 14, 2012
 * \author correa
 */

#ifndef BITMAPDIRECTLYADDRESSEDSETS_H_
#define BITMAPDIRECTLYADDRESSEDSETS_H_

#include "MultiLevelDirectlyAddressedSet.h"

template<typename T>
class BitMapDirectlyAddressedSets {

public:

	 /*!
	  * \brief Implementation of the union operation using filtered iteration and bit parallelism
	  *
	  * \param res the resulting set
	  * \param a the first set
	  * \param b the second set
	  */
	static void unionOf(ArrayBitMapDirectlyAddressedSet<T>* res, ArrayBitMapDirectlyAddressedSet<T>* a, ArrayBitMapDirectlyAddressedSet<T>* b);
	 /*!
	  * \brief Implementation of the union operation using filtered iteration and bit parallelism
	  *
	  * \param res the resulting set
	  * \param a the first set
	  * \param b the second set
	  */
	static void unionOf(ArrayBitMapDirectlyAddressedSet<T>* res, ArrayBitMapDirectlyAddressedSet<T>* a, MultiLevelDirectlyAddressedSet<T>* b);
	 /*!
	  * \brief Implementation of the union operation using filtered iteration and bit parallelism
	  *
	  * \param res the resulting set
	  * \param a the first set
	  * \param b the second set
	  */
	static void unionOf(MultiArrayDirectlyAddressedSet<T>* res, MultiArrayDirectlyAddressedSet<T>* a, MultiHashDirectlyAddressedSet<T>* b);
	 /*!
	  * \brief Implementation of the union operation using filtered iteration and bit parallelism
	  *
	  * \param res the resulting set
	  * \param a the first set
	  * \param b the second set
	  */
	static void unionOf(MultiArrayDirectlyAddressedSet<T>* res, MultiArrayDirectlyAddressedSet<T>* a, MultiArrayDirectlyAddressedSet<T>* b);
	 /*!
	  * \brief Implementation of the union operation using filtered iteration and bit parallelism
	  *
	  * \param res the resulting set
	  * \param a the first set
	  * \param b the second set
	  */
	static void unionOf(MultiArrayDirectlyAddressedSet<T>* res, MultiHashDirectlyAddressedSet<T>* a, MultiHashDirectlyAddressedSet<T>* b);

	 /*!
	  * \brief Implementation of the intersection operation using filtered iteration and bit parallelism
	  *
	  * \param res the resulting set
	  * \param a the first set
	  * \param b the second set
	  */
	static void intersectOf(ArrayBitMapDirectlyAddressedSet<T>* res, ArrayBitMapDirectlyAddressedSet<T>* a, ArrayBitMapDirectlyAddressedSet<T>* b);
	 /*!
	  * \brief Implementation of the intersection operation using filtered iteration and bit parallelism
	  *
	  * \param res the resulting set
	  * \param a the first set
	  * \param b the second set
	  */
	static void intersectOf(ArrayBitMapDirectlyAddressedSet<T>* res, ArrayBitMapDirectlyAddressedSet<T>* a, MultiLevelDirectlyAddressedSet<T>* b);
	 /*!
	  * \brief Implementation of the intersection operation using filtered iteration and bit parallelism
	  *
	  * \param res the resulting set
	  * \param a the first set
	  * \param b the second set
	  */
	static void intersectOf(MultiLevelDirectlyAddressedSet<T>* res, MultiLevelDirectlyAddressedSet<T>* a, MultiLevelDirectlyAddressedSet<T>* b);

	 /*!
	  * \brief Implementation of the symmetric difference operation using filtered iteration and bit parallelism
	  *
	  * \param res the resulting set
	  * \param a the first set
	  * \param b the second set
	  */
	static void symDiffOf(ArrayBitMapDirectlyAddressedSet<T>* res, ArrayBitMapDirectlyAddressedSet<T>* a, ArrayBitMapDirectlyAddressedSet<T>* b);
	 /*!
	  * \brief Implementation of the symmetric difference operation using filtered iteration and bit parallelism
	  *
	  * \param res the resulting set
	  * \param a the first set
	  * \param b the second set
	  */
	static void symDiffOf(ArrayBitMapDirectlyAddressedSet<T>* res, ArrayBitMapDirectlyAddressedSet<T>* a, MultiLevelDirectlyAddressedSet<T>* b);
	 /*!
	  * \brief Implementation of the symmetric difference operation using filtered iteration and bit parallelism
	  *
	  * \param res the resulting set
	  * \param a the first set
	  * \param b the second set
	  */
	static void symDiffOf(MultiLevelDirectlyAddressedSet<T>* res, MultiLevelDirectlyAddressedSet<T>* a, MultiLevelDirectlyAddressedSet<T>* b);

	 /*!
	  * \brief Implementation of the difference operation using filtered iteration and bit parallelism
	  *
	  * The resulting set is assigned the difference \c a \c - \c b
	  *
	  * \param res the resulting set
	  * \param a the first set
	  * \param b the second set
	  */
	static void diffOf(ArrayBitMapDirectlyAddressedSet<T>* res, ArrayBitMapDirectlyAddressedSet<T>* a, ArrayBitMapDirectlyAddressedSet<T>* b);
	 /*!
	  * \brief Implementation of the difference operation using filtered iteration and bit parallelism
	  *
	  * \param res the resulting set
	  * \param a the first set
	  * \param b the second set
	  */
	static void diffOf(ArrayBitMapDirectlyAddressedSet<T>* res, ArrayBitMapDirectlyAddressedSet<T>* a, MultiLevelDirectlyAddressedSet<T>* b);
	 /*!
	  * \brief Implementation of the difference operation using filtered iteration and bit parallelism
	  *
	  * \param res the resulting set
	  * \param a the first set
	  * \param b the second set
	  */
	static void diffOf(MultiLevelDirectlyAddressedSet<T>* res, MultiLevelDirectlyAddressedSet<T>* a, MultiLevelDirectlyAddressedSet<T>* b);
};



#endif /* BITMAPDIRECTLYADDRESSEDSETS_H_ */
